﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/AdminCP/Views/Shared/ViewMasterPage1.Master"
    Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<%@ Import Namespace="InfoTech.AdminCP.Controllers.Configuration.Theme" %>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <%using (Html.BeginForm())
      {
    %>
    <input type="hidden" id="theme" name="theme" />
    <div align="right">
        <input type="submit" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
            value="Save Changes" />
    </div>
    <table cellpadding="5" cellspacing="5">
        <%
            int column = 0;
            foreach (string s in ThemeManager.List_Theme_Support())
            {
                column++;
                if (column == 1)
                {
        %>
        <tr>
            <%
}
                
            %>
            <td>
                <table cellpadding="5" cellspacing="5">
                    <tr>
                        <td>
                            <img class="thumbnail" src="<%=Html.UploadVitualPath("Theme") + s%>.png" alt="<%=s%>"
                                onclick="ChooseLayout('<%=s%>',this)" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <%=s%>
                        </td>
                    </tr>
                </table>
            </td>
            <%
                if (column == 5)
                {
                    column = 0;
            %>
        </tr>
        <%
}
            }%>
    </table>
    <%
        }%>
    <script language="javascript" type="text/javascript">
        $(function () {
            $('.thumbnail').css('cursor', 'pointer');
        });
        function ChooseLayout(id, obj) {
            $('#theme').val(id);
            $('.thumbnail').css('border', 'none');
            $(obj).css('border-style', 'solid');
            $(obj).css('border-width', '2');
            $(obj).css('border-color', '#188fce');
        }
    </script>
</asp:Content>
